#ifndef __QYQ_ARITHMETIC_RECEIVE_H_
#define __QYQ_ARITHMETIC_RECEIVE_H_
#include "chip_include.h"
#ifndef __QYQ_ARITHMETIC_RECEIVE_C_
#define QYQ_ARITHMETIC_RECEIVE_EXT extern
#else
#define QYQ_ARITHMETIC_RECEIVE_EXT
#endif

typedef struct
{
    //接收延迟时间，根据具体的时间基准来决定
    uint16_t qyq_arithmetic_receive_timeout;
    //接收buf索引值
    uint16_t qyq_arithmetic_receive_index;
    //滴答定时标志位
    uint16_t qyq_arithmetic_receive_tick;
    //结束判断标志计数器
    uint16_t qyq_arithmetic_receive_count; 
    //接收数据最大长度
    uint16_t qyq_arithmetic_receive_max_size;

    //结束标志
    uint8_t *qyq_arithmetic_receive_end_list;
    uint16_t qyq_arithmetic_receive_end_size;
}qyq_arithmetic_receive_t;

QYQ_ARITHMETIC_RECEIVE_EXT int8_t qyq_arithmetic_receive(uint8_t new_value, uint16_t new_tick, uint16_t *rx_buf, uint16_t *rx_length, qyq_arithmetic_receive_t *qyq_arithmetic_config);

#endif
